package com.course.common.enums;

/**
 * @PROJECT_NAME: course
 * @DESCRIPTION: 公共常量类
 * @Author: 涂玄武
 * @DATE: 2021/4/9 10:24
 */
public class Constant {

    public static final String LOGIN_USER = "LOGIN_USER";

    public static final String REDIS_LOGIN_PREFIX = "system:admin:login:";

    public static final String RedisMapCacheUserOrder="MapCache:User:Order";

    //订单类型
    public enum OrderType{

        Item("SP","商品订单"),
        Sale("XS","销售订单"),

        ;

        private String type;
        private String desc;

        OrderType(String type, String desc) {
            this.type = type;
            this.desc = desc;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    //支付状态（1=未支付；2=已支付；3=已发货；4=用户已收货；5=系统自动收货；6=用户已取消；7=系统已自动取消）
    public enum OrderPayStatus{

        UnPay(1,"未支付"),
        HasPay(2,"已支付"),
        HasDelivery(3,"已发货"),
        UserReceiveGood(4,"用户已收货"),
        SystemReceiveGood(5,"系统自动收货"),
        UserCancel(6,"用户已取消"),
        SystemCancel(7,"系统已自动取消"),
        ;

        OrderPayStatus(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private Integer code;
        private String msg;

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
}
